package tgc.edu.demo.jkxt.entity;

import java.util.ArrayList;
import java.util.List;

import javax.persistence.Entity;
import javax.persistence.ManyToMany;
import javax.persistence.Table;

import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;

import tgc.edu.demo.jkxt.custom.BaseEntity;



@Entity
@Table(name = "sysrole")
public class SysRole  extends BaseEntity<Integer>{
	private String name;
	private String code;
	private List<SysUser> sysUsers=new ArrayList<SysUser>();
	public SysRole() {
		super();
	}

	public SysRole(Integer id) {
		super(id);
	}

	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public String getCode() {
		return code;
	}
	public void setCode(String code) {
		this.code = code;
	}
	@JsonIgnore
	@ManyToMany(mappedBy = "roles")
	public List<SysUser> getSysUsers() {
		return sysUsers;
	}
	public void setSysUsers(List<SysUser> sysUsers) {
		this.sysUsers = sysUsers;
	}
	
}
